package com.njtcedu.microblog.common.entity.dictionary;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity(name = "ImageInfo")
@Table(name = "ImageInfo", schema = "microblog")
public class ImageInfo implements Serializable {

    @Id
    @GeneratedValue
    @Column(name = "id")
    private Integer id;

    @Column(name = "imageName", length = 50, nullable = false)
    private String imageName;

    @Column(name = "imageType", length = 100, nullable = false)
    private String imageType; //ad user


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public String getImageName() {
		return imageName;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	public String getImageType() {
		return imageType;
	}

	public void setImageType(String imageType) {
		this.imageType = imageType;
	}

	@Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;

        ImageInfo image = (ImageInfo) object;

        return !(id != null ? !id.equals(image.id) : image.id != null);
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

	@Override
	public String toString() {
		return "ImageInfo [id=" + id + ", imageName=" + imageName
				+ ", imageType=" + imageType + "]";
	}


}
